#ifndef BTFORM_H
#define BTFORM_H

#include <QWidget>
#include<QPropertyAnimation>

namespace Ui {
class BTForm;
}

class BTForm : public QWidget
{
    Q_OBJECT

public:
    explicit BTForm(QWidget *parent = nullptr);
    ~BTForm();

    //设置图标和文本和pageid
    void setIconAndText(const QString& path,const QString& text,int pageId);

    //获取PageId成员变量
    int getPageId()const;

    //清除背景
    void clearbackground();

    //显示动画
    void showAnimal();
    //隐藏动画
    void hideAnimal();
protected:

    //对于鼠标发生按下事件时的btForm
    void mousePressEvent(QMouseEvent *event);

signals:
    void btClicked(int id);//点击btForm时发送信号，同时传过去id



private:
    Ui::BTForm *ui;
    int pageId;

    QPropertyAnimation* line1Animal;
    QPropertyAnimation* line2Animal;
    QPropertyAnimation* line3Animal;
    QPropertyAnimation* line4Animal;

};

#endif // BTFORM_H
